package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IAddAddressActivityModel;
import com.wgts.wgts.mvp.model.imp.AddAddressActivityModel;
import com.wgts.wgts.mvp.presenter.IAddAddressActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.AddAddressActivityPresenter;
import com.wgts.wgts.mvp.view.IAddAddressActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/410:43
 *
 */
@Module
public class AddAddressActivityModule {
    private IAddAddressActivityView view;

    public AddAddressActivityModule(IAddAddressActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IAddAddressActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IAddAddressActivityModel provideModel(NetService netService){
        return new AddAddressActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IAddAddressActivityPresenter providePresenter(IAddAddressActivityView view, IAddAddressActivityModel model){
        return new AddAddressActivityPresenter(view, model);
    }
}
